Remote-first 2-row dashboard shell (admin-gated, experimental)#331
Merged
Conversation
…builder.ts - Removed duplicate import of Tool from coc-agent-sdk. - Consolidated and organized imports for better readability. - Updated return values in several functions to remove unnecessary suffix strings. - Enhanced code clarity by removing commented-out code and unused variables.
Implements the "CoC Shell Redesign" top navigation as an opt-in, remote-first shell. Default off; toggled via repo Settings -> Remote Shell (localStorage `coc-remote-shell-enabled`). Desktop only; classic nav is unchanged when the flag is off. - RemoteTopBar (row 1): one tab per git remote via groupReposByRemote, with a clone-count chip, aggregate running pulse, and summed unseen badge. - RemoteSubBar (row 2): remote-scope (Work Items, Pull Requests) | clone switcher popover | clone-scope tabs (Activity/Chats, CLI Sessions, Git, Terminal) | ... overflow (Explorer, Schedules, ...) | compact Ask/Queue. - Reuses existing AppContext/Queue/Repos selection and Router hash routing; renders above a chromeless RepoDetail body. - Extracts RepoDetail's sub-tab visibility logic into repoSubTabs.ts (computeVisibleSubTabs) shared by both surfaces; moves SHOW_WIKI_TAB / SHOW_MEMORY_TAB into featureFlags.ts (re-exported from TopBar). Tests: 33 new unit/component tests (shell model, tab partition, flag hook, RemoteTopBar, RemoteSubBar); updated 3 source-scraping tests for the relocated tab logic. tsc, eslint, and client build all clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ranch switching Removed outdated quick-start pointers from the AGENTS.md file and added a new hard invariant stating that AI must never switch branches during operation. This enhances clarity and ensures adherence to best practices in the development process.
Promotes the remote-first shell from a per-repo / localStorage client flag to a global `features.remoteShell` admin setting, toggled in Admin -> Configure -> Features (Remote-first shell). Applies to the whole deployment and takes effect on reload (no restart). - Registry: adds features.remoteShell to ADMIN_SETTING_DEFINITIONS (auto- renders on the Features card), config.ts defaults, and the RuntimeDashboardConfig.features contract (remoteShellEnabled). - Client: new useRemoteShellEnabled() reads the live flag via isRemoteShellEnabled() (utils/config), replacing the localStorage useRemoteShell hook; TopBar and ReposView consume it. - Removes the per-repo Remote Shell select from RepoPreferencesSection. Tests: replaces the localStorage hook test with useRemoteShellEnabled coverage; the generic admin-setting contract suite auto-covers the new definition. tsc (coc + coc-client), eslint, and client build are clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Show every clone-scoped sub-tab inline and collapse only the tabs that do not fit into the ... overflow, instead of always hiding all but a fixed primary set. Mirrors the repo tab strip's width-measurement approach. - shellModel: partitionShellTabs now returns all non-remote tabs as the clone scope (no fixed overflow); adds computeVisibleTabKeys (pure, tested) to pick the tabs that fit and always keep the active one visible. - RemoteSubBar: measures clone tabs against the available width via a hidden mirror + ResizeObserver and renders the overflow tail under ... Tests: rewrites the partition test, adds computeVisibleTabKeys coverage, updates the RemoteSubBar component test for the all-visible path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The clone-switcher popover is per-origin, so the "Clone again / add worktree" action living inside it was confusingly scoped. Move it to a single top-level "+" button at the end of RemoteTopBar (row 1) that opens CloneRepoDialog; the popover now just lists the remote's clones. - RemoteTopBar: trailing "+" (remote-add-clone) opens CloneRepoDialog and refreshes repos on success. - RemoteSubBar: drop the popover footer, the dialog, and the now-unused onRefresh prop (ReposView no longer passes it). Tests: add the top-level add-clone test; drop the removed footer wiring. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The top-level "+" only offered Clone, which dropped the "Add workspace folder" (register an existing local folder) and "Add specific repository" actions the classic repo strip had. Make the "+" an add menu with all three: Add workspace folder (AddFolderDialog), Add specific repository (AddRepoDialog), Clone repository (CloneRepoDialog) — placed outside the scroll container so the dropdown isn't clipped. Tests: cover the add menu and the folder / clone dialog paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- RepoDetail-mobile: update the desktop-header guard assertion for the new `!isMobile && !chromeless` condition (chromeless remote shell). - config.test: add features.remoteShell to the all-overridden fixture and refresh the resolved-config inline snapshot for the new flag. - chat-tool-builder / loop-tools-addon: drop assertions for the prompt-builder tool-guidance suffixes intentionally emptied in aa695ef (the tools themselves remain wired and asserted). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR #331 CI: 10 test files partially-mock featureFlags. Moving SHOW_WIKI_TAB into it (so repoSubTabs could read it) made those mocks throw on the missing export wherever repoSubTabs is transitively imported (e.g. AdminPanel, ReposGrid). Move SHOW_WIKI_TAB / SHOW_MEMORY_TAB to a dedicated lightweight navFlags.ts (re-exported from TopBar for BottomNav/Router); featureFlags.ts's public surface is restored so the existing partial mocks keep working. Also update executors-prompt-builder.test.ts for the search_conversations suffix removed in aa695ef (the tools stay wired and asserted). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a remote-first two-row top navigation shell for the CoC dashboard (the "CoC Shell Redesign" — Native look, popover clone switch). It's an opt-in global admin setting (default off), so the current per-clone navigation is unchanged until enabled.
Enable via Admin → Configure → Features → Remote-first shell (
features.remoteShell). Desktop-only; takes effect on reload.What changed
Row 1 —
RemoteTopBar(replacesRepoTabStripwhen on): one tab per git remote (origin) viagroupReposByRemote, with a color dot, clone-count chip, aggregate running pulse, and summed unseen badge. A top-level+add menu offers Add workspace folder, Add specific repository, and Clone repository.Row 2 —
RemoteSubBar(above a chromelessRepoDetail):…menu (measured via a hidden mirror +ResizeObserver, active tab always kept visible).Plumbing: reuses existing
AppContext/QueueContext/ReposContextselection andRouterhash routing; extractsRepoDetail's sub-tab visibility into a shared, testedrepoSubTabs.ts(computeVisibleSubTabs); addsfeatures.remoteShellto the unified admin registry (ADMIN_SETTING_DEFINITIONS+ config defaults +RuntimeDashboardConfig.features), read client-side viauseRemoteShellEnabled().Reviewer notes
chromelessdefaults false;RepoTabStripuntouched).SHOW_WIKI_TAB/SHOW_MEMORY_TABmoved fromTopBarintofeatureFlags.ts(re-exported fromTopBarfor back-compat).coc-knowledgedashboard-spa reference.Tests
New unit/component tests under
test/spa/react/remote-shell/(shell model, tab partition, fit/overflow math, flag hook, RemoteTopBar, RemoteSubBar); updated existing source-scraping tests for the relocated tab logic; the generic admin-setting contract suite auto-covers the new flag. tsc (coc + coc-client), eslint, and client build are clean.Also included
Two pre-existing local commits that were on
mainahead oforigin/mainare bundled in at the author's request:aa695ef8refactor(coc): streamline imports and clean up unused code in prompt-builder.ts8f261de5docs(AGENTS): update quick-start pointers and add hard invariant on branch switching🤖 Generated with Claude Code